Objects Reference

boundbox

Definition

class boundbox
{
  public:
  vector min,max;

  void reset()
  {
    min.vec(BIG,BIG,BIG);
    max.vec(-BIG,-BIG,-BIG);
  };
  void add_point(vector &p);
  void add_point(float x,float y,float z);
  int ray_intersect(vector& ro,vector& rd,float& tnear,float& tfar);
};

Data Members

Member Type Description
min vector minimum corner of bounding box
max vector maximum corner of bounding box

Methods

reset, add_point, ray_intersect

Remarks

This class impements a axis aligned bounding box (AABB). The min vector specifies the minimum co-ordinates for the AABB and max the maximum co-ordinates.

See Also

vector